#pragma once

//safe release macros
#define SAGE_RELEASE_DN(x) if(x){delete x; x = 0;}
#define SAFE_RELEASE_URN(x) if(x){x->Release();x=0;}
#define SAFE_RELEASE_LRN(x) if(x){x->release();x=0;}
#define SAFE_RELEASE_URDN(x) if(x){x->Release();delete x;x=0;}
#define SAFE_RELEASE_LRDN(x) if(x){x->release();delete x;x=0;}
#define SAFE_RELEASE_LIST(x) for(int i = 0; i < x.size(); i++)\
							 {delete x[i];}x.release();